const {Sequelize} = require("sequelize");

/**
 * 开始连接
 * 
 */


const sequelize = new Sequelize({
  dialect:"mysql",
  database:"learn-sequelize",
  username:"root",
  password:"413606095",
  host:"182.92.229.9",
  port:'3306'
});

(async()=>{
  try{
    await sequelize.authenticate();
    console.log("Connection has been established successfully.");
  }catch(error){
    console.error("unable to connect to the database:",error);
  }
})();



